package cn.com.ejiakanghu.dto;

import cn.com.ejiakanghu.core.utils.LngLatUtil;
import org.linlinjava.litemall.db.domain.AgedmallCloudHouse;
import org.linlinjava.litemall.db.domain.AgedmallStore;

import java.math.BigDecimal;
import java.util.Map;

/**
 * @author wj
 * @date 2021/11/18 11:12
 */
public class PackageAddressDto {

    private String province;

    private String city;

    private String village;

    private String userName;

    private String phone;

    private String address;

    private String detail;

    private BigDecimal lng;

    private BigDecimal lat;

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getVillage() {
        return village;
    }

    public void setVillage(String village) {
        this.village = village;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public BigDecimal getLng() {
        return lng;
    }

    public void setLng(BigDecimal lng) {
        this.lng = lng;
    }

    public BigDecimal getLat() {
        return lat;
    }

    public void setLat(BigDecimal lat) {
        this.lat = lat;
    }


    public PackageAddressDto(String province, String city, String village, String userName, String phone, String address, String detail, BigDecimal lng, BigDecimal lat) {
        this.province = province;
        this.city = city;
        this.village = village;
        this.userName = userName;
        this.phone = phone;
        this.address = address;
        this.detail = detail;
        this.lng = lng;
        this.lat = lat;
    }

    public PackageAddressDto() {
    }

    public PackageAddressDto(AgedmallStore store) {
        this.province = store.getProvinceName();
        this.city = store.getCityName();
        this.village = store.getAreaName();
        this.userName = store.getUserName();
        this.phone = store.getPhone();
        this.address = store.getAddressDetail();
        this.detail = "";
        this.lng = store.getLng();
        this.lat = store.getLat();
    }

    public PackageAddressDto(AgedmallCloudHouse cloudHouse) {
        this.province = cloudHouse.getProvince();
        this.city = cloudHouse.getCity();
        this.village = cloudHouse.getVillage();
        this.userName = "";
        this.phone = "";
        this.address = cloudHouse.getAddressDetail();
        this.detail = "";
        this.lng = cloudHouse.getLng();
        this.lat = cloudHouse.getLat();
    }
}
